package com.haoshui.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.haoshui.domain.ResponseResult;
import com.haoshui.domain.dto.ArticleDto;
import com.haoshui.domain.entity.Article;

import java.util.List;

public interface ArticleService extends IService<Article> {


    ResponseResult<Article> hotArticleList();


    ResponseResult articleList(Integer pageNum, Integer pageSize, Long categoryId);

    ResponseResult getArticleDetail(Long id);


    ResponseResult updateViewCount(Long id);

    Long addArticle(ArticleDto article);

    Long addArticle2(ArticleDto article);

    Page findArticle(Integer pageNum, Integer pageSize, String title, String summary);

    Article getArticle(Long id);

    boolean updateArticle(Article article);

    void updateViewCountToDateBase(List<Article> articles);
}
